package com.dksidana.java.jdbc.bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.dksidana.java.jdbc.core.ResultSetHandler;

public class BeanResultSetHandler<T> implements ResultSetHandler<T>{
	private final Class<T> type;
	public BeanResultSetHandler(Class<T> type) {
		this.type=type;
	}
	public T handleResultSet(ResultSet resultSet) throws SQLException {
		return BeanHandler.toBean(resultSet, type);
	}	
}
